<html>

	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="keywords" content="微商城管理后台，专助快消品行业服务商" />
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<meta http-equiv="Cache-Control" content="no-cache,must-revalidate" />
		<title>商家登录 | 智管家－专助快消品行业服务商</title>
		<link rel="archives" title="智管家" href="http://www.XXX.net/" />
		<link rel="bookmark" type="image/x-icon" href="img/zlan.ico" />
		<link rel="shortcut icon" href="img/zlan.ico" type="image/x-icon">
		<meta charset="utf-8">
		<link href="css/login/login.css" rel="stylesheet" rev="stylesheet" type="text/css" media="all" />
		<link href="css/login/login2.css" rel="stylesheet" rev="stylesheet" type="text/css" media="all" />
		<link href="css/login/bootstrap.min.css" rel="stylesheet" rev="stylesheet" type="text/css" media="all" />
		<link href="css/login/jquery.slider.css" rel="stylesheet" rev="stylesheet" type="text/css" media="all" />
		<link href="css/skin/Content/Shop/fonts/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" href="css/dialog.css">

		<script src="Js/lib/jquery/jquery-1.9.0.min.js"></script>
		<script src="js/JS/jquery.slider.min.js"></script>
		<script src="js/JS/jquery-ui-1.10.4.custom.js?v=20140818"></script>
		<script src="js/JScripts/Shop/module/bootstrap.min.js"></script>
		<script src="js/JS/layout.js" type="text/javascript"></script>

		<script src="js/JS/jquery.md5.js" type="text/javascript"></script>
		<script src="js/dialog.js"></script>
		<script src="js/constants.js?v=20230921" type="text/javascript"></script>
		<script src="js/api.js" type="text/javascript"></script>
	</head>

	<style>
		footer {
			overflow: hidden;
			background: #3b3b3b;
			color: #666;
			padding: 20px 0
		}
		
		footer a {
			display: block;
		}
		
		footer p {
			margin: 10px 0;
		}
		
		footer .link ul {
			height: 168px;
			overflow: hidden
		}
		
		footer .link ul li {
			float: left;
			width: 20%;
			overflow: hidden
		}
		
		footer .link ul li h4 {
			font-size: 16px;
			color: #FD9D00
		}
		
		footer .link ul li a {
			display: block;
			color: #999;
			text-decoration: none;
			padding: 0;
			line-height: 26px
		}
		
		.login-form {
			position: relative;
			width: 360px;
			background: #fff;
			box-shadow: 0 0 2px #ececec;
			font-family: "Microsoft Yahei"
		}
		
		.login-form .login-tab {
			height: 50px;
			line-height: 20px;
			font-size: 16px;
			overflow: hidden;
			border-bottom: 1px solid #eee
		}
		
		.login-form .login-tab .tab-item {
			position: relative;
			float: left;
			height: 100%;
			width: 50%;
			text-decoration: none;
			text-align: center
		}
		
		.login-form .login-tab .tab-item span {
			display: block;
			margin-top: 15px
		}
		
		.login-form .login-tab .tab-item i {
			display: none;
			position: absolute;
			width: 70px;
			height: 4px;
			background: #f60;
			bottom: -1px;
			left: 50%;
			margin-left: -35px
		}
		
		.login-form .login-tab .tab-item {
			color: #f60
		}
		
		.login-form .login-tab .tab-item.on i {
			display: block
		}
		
		.mobile-login,
		.username-login {
			padding: 20px 25px 35px 25px
		}
		
		.login-warning {
			padding: 2px 10px;
			font-size: 13px;
			background: ivory;
			border: 1px solid #fc6;
			margin: 8px 0
		}
		
		.login-warning i {
			float: left;
			width: 16px;
			height: 16px;
			margin: 1px 8px 0 0;
			background: url(img/login/sprite.png?v=1499949087528) -153px -27px no-repeat
		}
		
		.login-error {
			padding: 2px 10px;
			font-size: 13px;
			color: #323232;
			background: #fff0f0;
			border: 1px solid #ff3c3c;
			margin: 8px 0
		}
		
		.password-box,
		.phone-box,
		.username-box,
		.verify-box {
			margin-bottom: 20px
		}
		
		.siller-box,
		.login-form .pc-login .sms-box {
			margin-top: 20px
		}
		
		.verify-box .input-box {
			float: left;
			width: 100px;
			padding-left: 20px;
		}
		
		.verify-box .verify-code {
			float: left;
			width: 130px;
			border: 1px solid #ddd;
			line-height: 32px;
			border-left: 0 none
		}
		
		.verify-box .verify-code img {
			float: left;
			width: 70px;
			height: 30px;
			margin: 2px
		}
		
		.verify-box .verify-code:hover {
			text-decoration: none
		}
		
		.username-box {
			position: relative;
			clear: both
		}
		
		.input-box {
			position: relative;
			border: 1px solid #ddd;
			color: #999;
			padding: 0 32px 0 36px;
			height: 36px;
			overflow: hidden
		}
		
		.input-box input {
			display: block;
			width: 100%;
			height: 100%;
			line-height: 36px;
			padding: 0 32px 0 36px;
			border: 0;
			font-size: 13px;
			margin-left: -36px;
			height: 36px
		}
		
		input::-ms-clear {
			display: none;
		}
		
		.password-box,
		.phone-box,
		.username-box,
		.verify-box {
			margin-bottom: 20px
		}
		
		.input-box .icon {
			width: 36px;
			height: 36px;
			position: absolute;
			top: 0;
			left: 0
		}
		
		.input-box .username-icon {
			background: url(img/login/sprite.png) -123px -67px no-repeat
		}
		
		.input-box.input-focus .username-icon {
			background: url(img/login/sprite.png) -82px -67px no-repeat
		}
		
		.input-box .password-icon {
			background: url(img/login/sprite.png) 0 -108px no-repeat
		}
		
		.input-box.input-focus .password-icon {
			background: url(img/login/sprite.png) -41px -67px no-repeat
		}
		
		.input-box .clear {
			display: none;
			width: 32px;
			height: 36px;
			position: absolute;
			top: 0;
			right: 0;
			background: url(img/login/sprite.png) -82px -108px no-repeat;
			cursor: pointer
		}
		
		.input-box .verify-icon {
			background: url(img/login/sprite.png) -41px -108px no-repeat
		}
		
		.input-box.input-focus .verify-icon {
			background: url(img/login/sprite.png) 0 -67px no-repeat
		}
		
		.input-box .ok {
			display: none;
			position: absolute;
			width: 16px;
			height: 16px;
			top: 10px;
			right: 8px;
			background: url(img/login/sprite.png) -111px -27px no-repeat
		}
		
		.siller-box,
		.login-form .pc-login .sms-box {
			margin-top: 20px
		}
		
		.username-box {
			position: relative;
			clear: both
		}
		
		.login-submit {
			display: block;
			width: 310px;
			line-height: 40px;
			margin: 0 auto;
			background: #f60;
			border-radius: 5px;
			font-size: 13px;
			font-weight: 400;
			text-align: center;
			color: #fff
		}
		
		.login-submit:hover {
			color: #fff;
			text-decoration: none;
			background: #f50;
			cursor: pointer
		}
		
		.login-warning {
			padding: 2px 10px;
			font-size: 13px;
			background: ivory;
			border: 1px solid #fc6;
			margin: 8px 0
		}
		
		.login-warning i {
			float: left;
			width: 16px;
			height: 16px;
			margin: 1px 8px 0 0;
			background: url(img/login/sprite.png) -153px -27px no-repeat
		}
		
		.nav {
			-webkit-box-reflect: below 0 -webkit-linear-gradient(transparent, transparent 20%, rgba(255, 255, 255, .3));
		}
	</style>
	<script>
		function showErrorInfo(msg, inputId) {
			$('.login-error').find('span').html(msg);
			$('.login-error').show().siblings().hide();
			if(inputId) {
				$("#" + inputId + "").addClass("input-error");
			}
			if(inputId == 'showErrorVerifyCodeDiv') {
				$("." + inputId + "").find('.input-box').addClass("input-error");
			}
		}

		//普通登录处理回车事件
		function onNormalLogonKeyPress(evt) {
			//兼容IE和Firefox获得keyBoardEvent对象
			evt = (evt) ? evt : ((window.event) ? window.event : "")
			//兼容IE和Firefox获得 keyBoardEvent对象的键值
			var keyCode = evt.keyCode ? evt.keyCode : evt.which;
			if(keyCode == 13) {
				prepareLoginSubmit();
			}
		}

		//判断大小写锁定 
		function checkCapsLock(evt) {
			//兼容IE和Firefox获得keyBoardEvent对象
			evt = (evt) ? evt : ((window.event) ? window.event : "")
			//兼容IE和Firefox获得 keyBoardEvent对象的键值
			var keyCode = evt.keyCode ? evt.keyCode : evt.which;
			var isShift = evt.shiftKey || (keyCode == 16) || false;

			if(((keyCode >= 65 && keyCode <= 90) && !isShift) ||
				((keyCode >= 97 && keyCode <= 122) && isShift)
			) {
				$('.login-warning').find('span').html("键盘大写锁定已打开，请注意大小写");
				$('.login-warning').show().siblings().hide();
			} else {
				var msg = $(".login-warning").html();
				//当在密码输入框中输入正常的时候，错误提示的内容是"键盘大写",的时候，错误提示消失
				if(msg.indexOf("键盘大写") != -1) {
					showScanhide();
				}
			}
		}

		//普通登录：提交时检查账号
		function checkNormalLogonIdOnSubmit() {
			// 清掉服务器错误消息
			hideErrorInfo();
			var eml = $('#userName').val();
			if(eml == null || eml == "") {
				showErrorInfo("请输入用户名！", "showErrorUsernameDiv");
				return false;
			}
			hideErrorInfo();
			return true;
		}
		//普通登录：提交时检查密码
		function checkNormalLogonPwdOnSubmit() {
			// 清掉服务器错误消息
			hideErrorInfo();
			var pwd = $('#password').val();
			pwd = $api.trim(pwd);
			if(pwd.length < 6 || pwd.length > 30) {
				showErrorInfo("请输入6-20位密码！", "showErrorPwdDiv");
				return false;
			} else {
				hideErrorInfo();
				return true;
			}
		}
		//图片验证码位置按键的弹起事件
		function onKeyUpForValidate(evt) {
			//兼容IE和Firefox获得keyBoardEvent对象
			evt = (evt) ? evt : ((window.event) ? window.event : "")
			//兼容IE和Firefox获得 keyBoardEvent对象的键值
			var keyCode = evt.keyCode ? evt.keyCode : evt.which;

			if(keyCode == 13) {
				prepareLoginSubmit();
			} else {
				checkNormalLogonValidateCodeOnBlur();
			}
		}
		//图片验证码框中焦点移除的时候，进行提示
		function checkValidateCodeOnBlur() {
			var vcd = $('.validate:visible').val();
			if(vcd == null || vcd == "") {
				return;
			} else if(vcd.length == 4) {
				//没有在提交中的时候进行提交操作  4个长度的时候需要是字符数字， 3个长度的时候需要是汉字
				return;
			} else {
				//showVerifyCodeError();
				return;
			}
		}
		// 普通登录：失去焦点时检查图片验证码
		function checkNormalLogonValidateCodeOnBlur() {
			// 清掉服务器错误消息
			var vcd = $('.validate:visible').val();
			if(vcd == null || vcd == "") {
				return false;
			} else if(vcd.length == 4) {
				//没有在提交中的时候进行提交操作    4个长度的时候需要是字符数字， 3个长度的时候需要是汉字

				checkImageValCode();

				return true;
			}
		}

		// 普通登录：失去焦点时检查图片验证码
		function checkNormalLogonValidateCodeOnBlur() {
			// 清掉服务器错误消息
			var vcd = $('.validate:visible').val();
			if(vcd == null || vcd == "") {
				return false;
			} else if(vcd.length == 4) {
				//没有在提交中的时候进行提交操作    4个长度的时候需要是字符数字， 3个长度的时候需要是汉字

				checkImageValCode();
				return true;
			}
		}

		function checkInputEvent() {
			$("#userName").blur(function() {
				checkShowImageCode();
			});
			$("#userName").keypress(function() {
				onNormalLogonKeyPress();
			});
			$("#phoneNumber").blur(function() {
				checkSmsLoginPhone();
			});
			$("#password").keypress(onNormalLogonKeyPress);
			$("#password").keypress(checkCapsLock);
			//实时校验
			$(".validate").keyup(onKeyUpForValidate);
			$(".validate").blur(checkValidateCodeOnBlur);
		}

		//是否显示图片验证码
		function checkShowImageCode() {
			var logonIdval = $api.trim($('#userName').val());
			if(logonIdval.length > 0) {
				userNameBlur("#userName", '');
			}
		}

		//是否显示验证信息
		function userNameBlur(o, v) {
			if($api.trim($(o).val()).length > 0) {
				var userNameVal = $(o).val();
				userNameVal = $api.trim(userNameVal);
			}
		};

		//图片验证码长度大于4的时候进行图片验证码的校验
		function checkImageValCode() {
			var imageValCode = $(".validate:visible").val();
			var vcd = $api.trim(imageValCode);

		}

		//检查是否是上次用Ajax校验过的图片验证码，如果是，返回true, 如果不是，则记录下来，返回false
		function isLastImgValCode(code) {
			if(gLastImgValCode == code) {
				return true;
			} else {
				gLastImgValCode = code;
				return false;
			}
		}

		function hideErrorInfo() {
			$('.login-error').find('span').html('');
			$('.login-blank').show().siblings().hide();

			$("#showErrorUsernameDiv").removeClass("input-error");
			$("#showErrorPwdDiv").removeClass("input-error");
			$(".showErrorVerifyCodeDiv .input-box").removeClass("input-error");
			$("#showErrorPhoneNumberDiv").removeClass("input-error");
			$("#showErrorSmsCodeDiv").removeClass("input-error");
		}

		//提交登录
		function prepareLoginSubmit() {
			//如果有图片验证，则需要先校验图片验证码，然后进行提交操作
			hideErrorInfo();

			if(!checkNormalLogonIdOnSubmit()) {
				return;
			}
			if(!checkNormalLogonPwdOnSubmit()) {
				return;
			}
			ajaxLogonSubmit();
		}

		var login_num = 0;
		//采用ajax方式进行认证请求
		function ajaxLogonSubmit() {
			login_num++;
			var username = $api.trim($('#userName').val());
			var pwd = $.md5($api.trim($('#password').val()));
			var verifyCode = $(".validate:visible").val();
			//登陆中

			var url = BaseUrl + "Login";
			var param = {
				"Login": username,
				"Pwd": pwd,
				"Vcode": verifyCode
			}
			$(".login-submit").val("正在登录");

			$.ajax({
				type: 'POST',
				url: url,
				async: false,
				data: param,
				dataType: 'json',
				success: function(data) {
					if(data.Code == 0) {
						//进行成功的跳转  
						$api.setStorage("token", data.Token);
						$api.setStorage("user", data.User);
						window.location = "main.html";
						window.event.returnValue = false;
					} else {
						//重新显示图片验证码
						yzmethod();

						showErrorInfo(data.Message);
						//重置登录按钮 
						$(".login-submit").val("登录");
					}
				},
				error: function(data) {
					var errorMessage = "不好意思，系统繁忙，请稍后再试！";
					showErrorInfo(errorMessage);
					//重置登录按钮
					$(".login-submit").val("登录");

					yzmethod();
				}
			});
		}

		function yzmethod() {
			$("#imageCode").attr("src", "https://jg.zhelan.net/api/View/ImgCode.aspx");
		}

		$(function() {
			//绑定各种输入框的函数
			//			var url = window.location.href;          
			//			if(url.indexOf("https") < 0) {              
			//				url = url.replace("http:", "https:");              
			//				window.location.replace(url);          
			//			}
			$("#imageCode").attr("src", "https://jg.zhelan.net/JGApi/View/ImgCode.aspx");
//			src="https://minipd.hderp.cn/api/View/ImgCode.aspx"
			checkInputEvent();
		});
	</script>

	<body>
		<!--导航栏-->
		<div class="header">
			<h1 class="headerLogo">
    <span title="分销小程序管理后台" class="nav"  style="font-weight: 500; -webkit-box-reflect: below;" target="_blank" >
     加购系统管理后台 </span></h1>
			<div class="headerNav">
				<p class="telW"></p>
			</div>
		</div>
		<!--登陆界面-->
		<div class="banner" style="margin-top:10px;">
			<div class="login-aside">
				<div class="login-form">
					<div class="login-tab">
						<a href="javascript:void(0)" class="tab-item "><span id="alogin">账户登录</span><i></i></a>
					</div>
					<div class="username-login">

						<div>
							<div class="login-warning"><i></i><span>公共场所不建议自动登录！</span></div>
							<div class="login-error" style="display:none;"><i></i><span>账户名与密码不匹配请重新输入！<a href="#">忘记密码</a></span></div>
							<div class="login-blank" style="line-height:20px;">&nbsp;</div>
						</div>
						<div class="username-box">
							<div class="input-box" id="showErrorUsernameDiv">
								<input id="userName" placeholder="账户" type="text" autocomplete="off" value="" tabindex="1">
								<i class="icon username-icon"></i>
								<i class="clear"></i>
							</div>
						</div>
						<div class="password-box">
							<div class="input-box" id="showErrorPwdDiv">
								<input id="password" type="password" placeholder="密码" autocomplete="off" tabindex="2">
								<i class="icon password-icon"></i>
								<i class="clear"></i>
							</div>
						</div>
						<div class="verify-box clearfix" id="div_vcode">
							<div>
								<input class="validate input-box" placeholder="验证码" type="text" maxlength="4" autocomplete="off" tabindex="3">
							</div>
							<a href="javascript:void(0);" class="verify-code">

								<img id="imageCode"  style="cursor:pointer;" alt="图形验证码" />
								<span onclick="document.getElementById('imageCode').src='https://jg.zhelan.net/JGApi/View/ImgCode.aspx?a='+Math.random();">换一张</span>
							</a>
						</div>

						<a id="submit" name="Logon_index_denglu002" onclick="javascript:prepareLoginSubmit();" class="login-submit">登 录</a>

					</div>

				</div>

			</div>
			<img style="width: 100%;" src="http://qiniudns01.zhelan.net/banner4.jpg" />

		</div>

		<!--底部-->
		<footer>
			<div class="container">
				<div class="row clearfix">
					<div style="font-size: 12px;" class="col-sm-4 col-md-4 col-lg-4 column">
						<!--<a href="https:www.XXX.net"><img style="height: 44px;" src="img/login/foot_logo.png" alt="A2城市管理中心" /></a>-->
						<p style="line-height: 22px;">加购运营管理后台 © 2016－2023<br />
							<a href="http://www.beian.miit.gov.cn">浙ICP备17024780号-2</a>
						</p>
					</div>

				</div>
			</div>
		</footer>

		<!--<ul class="left-side-flyelem show" style="margin-top:20px;">
			<a href="#">
				<li class="lsf-items icon kxfont icon-Fx02 side-icon"></li>
			</a>
			<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=739827603&site=qq&menu=yes">
				<li class="lsf-items icon kxfont icon-qq side-icon"></li>
			</a>
			<a target="_blank" href="https://www.XXX.net/help.html">
				<li class="lsf-items icon kxfont icon-bangzhu side-icon"></li>
			</a>
			<a>
				<li class="lsf-items con kxfont icon-phone1 side-icon"></li>
			</a>
			<a target="_blank" href="tel:18357014111" href="https://www.XXX.net/contact.html">
				<li class="lsf-items icon kxfont icon-yijianfankui side-icon"></li>
			</a>
		</ul>-->
	</body>

</html>